<template>
  <view class="tool-wrap">
    <button class="btn" @tap="scan">模拟扫码</button>
    <text v-if="code" class="result">结果：{{ code }}</text>
    <text class="hint">原型演示：集成真实扫码能力需接入平台 API。</text>
  </view>
</template>

<script>
export default {
  name: 'ScannerPlaceholder',
  data() { return { code: '' } },
  methods: {
    scan() {
      // 占位：随机码
      this.code = 'CODE-' + Math.random().toString(36).slice(2, 8).toUpperCase()
      uni.showToast({ title: '已识别（占位）', icon: 'none' })
    }
  }
}
</script>

<style>
.tool-wrap { display: grid; gap: 12rpx; }
.btn { height: 60rpx; border-radius: 20rpx; border: 2rpx solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #e9ecff; font-size: 24rpx; }
.result { font-weight: 600; }
.hint { color: #a7b0d9; }
</style>


